package com.jing.yuntuku.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jing.yuntuku.model.bean.Picture;
import com.jing.yuntuku.model.bean.User;
import com.jing.yuntuku.model.dto.file.UploadPictureResult;
import com.jing.yuntuku.model.dto.picture.PictureQueryDto;
import com.jing.yuntuku.model.dto.picture.PictureReviewDto;
import com.jing.yuntuku.model.dto.picture.PictureUploadDto;
import com.jing.yuntuku.model.dto.picture.PictureVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 18151
 * @description 针对表【picture(图片)】的数据库操作Service
 * @createDate 2025-09-12 14:28:59
 */
public interface PictureService extends IService<Picture> {


    /**
     * 上传或者更新图片
     * @param multipartFile
     * @param pictureUploadDto
     * @param loginUser
     * @return
     */
    PictureVO uploadPicture(Object multipartFile,
                            PictureUploadDto pictureUploadDto,
                            User loginUser);

    /**
     * 分页查询
     *
     * @param pictureQueryDto
     * @return
     */
    QueryWrapper<Picture> getQueryWrapper(PictureQueryDto pictureQueryDto);

    /**
     * 获取单个图片
     * @param picture
     * @return
     */
    PictureVO getPictureVO(Picture picture,HttpServletRequest request);


    /**
     *
     */
    Page<PictureVO> getPictureVOPage(Page<Picture> picturePage, HttpServletRequest request);
    /**
     * 编辑图片判断
     * @param picture
     */
    void validPicture(Picture picture);

    /**
     * 图片1审核
     * @param pictureReviewDto
     * @param loginUser
     */
    void doPictureReview(PictureReviewDto pictureReviewDto, User loginUser);

    /**
     * 是管理员直接通过，不是管理员这进入审核
     * @param picture
     * @param loginUser
     */
    void fillReviewParams(Picture picture, User loginUser);

//
//    PictureVO uploadPictureurl(PictureUploadDto pictureUploadDto, User loginUser);
}
